package com.kiki.history.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kiki.history.mapper.ListeningHistoryMapper;
import com.kiki.history.domain.ListeningHistory;
import com.kiki.history.service.IListeningHistoryService;

/**
 * 收听历史Service业务层处理
 * 
 * @author 林志毅
 * @date 2025-01-08
 */
@Service
public class ListeningHistoryServiceImpl implements IListeningHistoryService 
{
    @Autowired
    private ListeningHistoryMapper listeningHistoryMapper;

    /**
     * 查询收听历史
     * 
     * @param historyId 收听历史主键
     * @return 收听历史
     */
    @Override
    public ListeningHistory selectListeningHistoryByHistoryId(Long historyId)
    {
        return listeningHistoryMapper.selectListeningHistoryByHistoryId(historyId);
    }

    /**
     * 查询收听历史列表
     * 
     * @param listeningHistory 收听历史
     * @return 收听历史
     */
    @Override
    public List<ListeningHistory> selectListeningHistoryList(ListeningHistory listeningHistory)
    {
        return listeningHistoryMapper.selectListeningHistoryList(listeningHistory);
    }

    /**
     * 新增收听历史
     * 
     * @param listeningHistory 收听历史
     * @return 结果
     */
    @Override
    public int insertListeningHistory(ListeningHistory listeningHistory)
    {
        return listeningHistoryMapper.insertListeningHistory(listeningHistory);
    }

    /**
     * 修改收听历史
     * 
     * @param listeningHistory 收听历史
     * @return 结果
     */
    @Override
    public int updateListeningHistory(ListeningHistory listeningHistory)
    {
        return listeningHistoryMapper.updateListeningHistory(listeningHistory);
    }

    /**
     * 批量删除收听历史
     * 
     * @param historyIds 需要删除的收听历史主键
     * @return 结果
     */
    @Override
    public int deleteListeningHistoryByHistoryIds(Long[] historyIds)
    {
        return listeningHistoryMapper.deleteListeningHistoryByHistoryIds(historyIds);
    }

    /**
     * 删除收听历史信息
     * 
     * @param historyId 收听历史主键
     * @return 结果
     */
    @Override
    public int deleteListeningHistoryByHistoryId(Long historyId)
    {
        return listeningHistoryMapper.deleteListeningHistoryByHistoryId(historyId);
    }
}
